package com.ruibang.glass.material.feign;

import com.ruibang.glass.common.domain.produce.BucketShipmentRecord;
import com.ruibang.glass.common.domain.sale.SaleOrderManagement;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Component
@FeignClient("glass-sale")
public interface SaleApi {

    @PostMapping("/api/glass/sale/order/management/updateGSaleOrderManagementByNumber")
    @ApiOperation(value = "修改发货数量", response = ResultBody.class)
    ResultBody updateGSaleOrderManagementByNumber(@RequestBody SaleOrderManagement saleOrderManagement);

    @PostMapping("/api/glass/sale/shipping/application/updateSaleShippingApplicationById")
    @ApiOperation(value = "修改发货数量", response = ResultBody.class)
    ResultBody saleShippingApplicationById(@RequestBody SaleOrderManagement saleOrderManagement);

    @PostMapping("/api/glass/sale/return/inventory/updateGSaleReturnInventoryReQuality")
    @ApiOperation(value = "修改发货数量", response = ResultBody.class)
    ResultBody updateGSaleReturnInventoryReQuality(@RequestBody List<SaleOrderManagement> saleOrderManagementList);

    @GetMapping("/api/glass/sale/shipping/application/updateSaleQualityById/{id}")
    @ApiOperation(value = "成品半成品拒绝发货数量回退", response = ResultBody.class)
    ResultBody updateSaleQualityById(@PathVariable("id") String id);

}
